﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PDX.ChangeTracking
{
    /// <summary>
    /// A change manager that supports Undo and Redo
    /// </summary>
    public interface IChangeManager
    {
        /// <summary>
        /// Gets a value indicating whether this instance can undo.
        /// </summary>
        /// <value>
        ///   <c>true</c> if this instance can undo; otherwise, <c>false</c>.
        /// </value>
        bool CanUndo { get; }

        /// <summary>
        /// Gets a value indicating whether this instance can redo.
        /// </summary>
        /// <value>
        ///   <c>true</c> if this instance can redo; otherwise, <c>false</c>.
        /// </value>
        bool CanRedo { get; }

        /// <summary>
        /// Undoes the change at the top of the Undo stack.
        /// </summary>
        void Undo();

        /// <summary>
        /// Redoes the change at the top of the Redo stack
        /// </summary>
        void Redo();

        /// <summary>
        /// Clears the Undo and Redo stacks
        /// </summary>
        void Clear();
    }
}
